export const STORAGE_AUTHORIZE_KEY = 'Authorization'

export const useAuthorization = createGlobalState(() => {
  let re = useRemeber()
  if (re.value) {
    return useStorage<null | string>(STORAGE_AUTHORIZE_KEY, null)
  }
  else {
    return useStorage<null | string>(STORAGE_AUTHORIZE_KEY, null, sessionStorage)
  }
})
